package week01;

public class TicketMaker {
    private int ticket=1000;
    private static TicketMaker singleton = new TicketMaker();



    public static TicketMaker getinstance() {
           return singleton;
       }

    private TicketMaker() {}

    public synchronized int getNextTicketNumber(){
        return ticket++;
    }
}